<template>
  <div id="main">
    <div id="header">
      <div style="font-size: 25px;
    float: left;
    color:white;
    margin-left: 15px;
    font-style:italic;
    margin-top: 15px">学生宿舍管理系统
      </div>
    </div>
    <div id="contain">
      <table style="margin: 50px auto">
        <th>
          <div style="font-size: 10px;
              color: white"
          >欢迎{{ user.username }}
          </div>
        </th>
        <tr>
          <td>
            <button class="btn">学生入住</button>
          </td>
        </tr>
        <tr>
          <td>
            <button class="btn">学生推送</button>
          </td>
        </tr>
        <tr>
          <td>
            <button class="btn">来访登记</button>
          </td>
        </tr>
        <tr>
          <td>
            <button class="btn">卫生登记</button>
          </td>
        </tr>
        <tr>
          <td>
            <button class="btn">退出系统</button>
          </td>
        </tr>
      </table>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UserIndex',
  data () {
    return {
      user: {}
    }
  },
  mounted () {
    this.user = JSON.parse(sessionStorage.getItem('user'))
  }
}
</script>

<style scoped>
#main {
  height: 600px;
  width: 600px;
  margin: 60px auto;
}

#header {
  width: 100%;
  height: 10%;
}

#contain {
  width: 100%;
  height: 90%;
}

.btn {
  width: 250px;
  margin-top: 20px;
  height: 50px;
}
</style>
